<template>
  <div class="container">
    <Category title="游戏" >
      <template scope="atguigu">
        <ul>
          <li v-for="(g, index) in atguigu.games" :key="index">{{g}}</li>
        </ul>
      </template>
    </Category>

    <Category title="游戏" >
      <!-- 旧版写法 slot-scope -->
      <template slot-scope="{games}">
        <ol>
          <li v-for="(g, index) in atguigu.games" :key="index">{{g}}</li>
        </ol>
      </template>
    </Category>

    <Category title="游戏" >
      <template scope="{games}">
        <h4 v-for="(g, index) in games" :key="index">{{g}}</h4>
      </template>
    </Category>
  </div>
</template>

<script>
  import Category from "./components/Category"

  export default {
    name: "App",
    components: {
      Category
    }
  };
</script>

<style>
  .container {
    display: flex;
    justify-content: space-around;
  }
  ul, li, ol {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .img,
  .video {
    width: 100%;
  }
  .foot {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
  }
</style>